<div class="page_detail_product_realestate">
	<div class="detail_product">
		<div class="row_filter mar_t_-5">
			<?php print $block_search_realestate; ?>
		</div> 
		<div class="">
			<?php print $breadcrumb; ?>
		</div>
		<div>
			<div class="col_left left detail_product_main w745 box_border_white pad10">
				<div class="line">
					<div class="col_left left cols14 man">
						<div class="headingDouble">
							<h1 class="fs18 color_c15 w630"><?php print $row->title;?></h1>
						</div>
					</div>
                    
                    <div class="col_right right">
                        <span class="fs18 color_c15 fwb"><?php print $row->text_price ? $row->text_price : 'Thỏa thuận'; ?></span>
                    </div>
					<div class="clf"></div>
				</div>	
				<div class="line mar_t_15">
                        <div class="col_0 left">                                
                            <div class="fs13">
                                <span>Loại tin rao:</span>                                    
                                <span class="color_111 fwb"><?php print mdGetTypeRealById($row->type_real)->name; ?></span>
                            </div>
                        </div>
                        <div class="col_1 left mar_l_30">                                
                            <div class="fs13">
                                <span>Vị trí :</span>
                                <span class="color_111 fwb"><?php print $row->name_district . ' , ' . $row->name_city; ?></span>
                            </div>
                        </div>
                        <div class="col_2 left mar_l_30">                                
                            <div class="price_product fs13">
                                <span>Giá : </span>
                                <span class="color_111 fwb"><?php print $row->text_price ? $row->text_price : 'Thỏa thuận'; ?></span>
                            </div>
                        </div>
                        <div class="col_3 left mar_l_30">                                
                            <div class="price_product fs13">
                                <span>Diện tích : </span>
                                <span class="color_111 fwb"><?php print $row->area ? $row->area . ' m²' : ' Không xác định'; ?></span>
                            </div>
                        </div>                            
                        <div class="clf"></div>
                    </div>		
				<div class="box"> 
					<div class="box_header box_head_basic mbs mln mar_b_5">
						<div class="line">
							<div class="col cols16 h5">
								<div class="">
									Thông tin mô tả
								</div>
							</div>
							<div class="col last_col txtR"></div>
							<div class="clf"></div>
						</div>					
					</div>
					<div class="box_body pln pan mar_t_10">
						<div class="line">
							<div class="col cols14">
								<div class="decripton_product_real"><?php print $row->content; ?></div>
							</div>
							<div class="col lastCol"></div>
							<div class="clf"></div>
						</div>
                        
						<div class="mtl">
                            <div class="col_left w400 left col_info_more">
                                <div class="_header  pbn mbm h5">
                                    Thông tin thêm
                                </div>	
                                <div class="">
                                    <table class="table table_hover table_row_bordered_top table_row_bordered_bottom tas h7 txt_c">
                                        <tbody>
                                            <?php if($row->project): ?>
                                            <tr>
                                                <td class="gray" style="width: 35%;">
                                                    Thuộc dự án  
                                                </td>
                                                <td>
                                                    <?php print $row->name_project; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->full_address): ?>
                                            <tr>
                                                 <td class="gray">
                                                    Địa chỉ  
                                                </td>  
                                                <td>
                                                    <?php print $row->full_address; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->type_real): ?>
                                            <tr>
                                                <td class="gray">
                                                    Loại tin rao 
                                                </td>
                                                <td>
                                                    <?php print mdGetTypeRealById($row->type_real)->name; ?>
                                                </td>
                                            </tr>
                                            <?php endif;?>
                                            <?php if($row->area): ?>
                                            <tr>
                                                 <td class="gray">
                                                    Diện tích 
                                                </td>
                                                <td>
                                                    <?php print $row->area; ?> m²
                                                </td>
                                            </tr>
                                            <?php endif;?>
                                            <?php if($row->price): ?>
                                            <!-- <tr>
                                                  <td class="gray">
                                                    Giá 
                                                </td>
                                                <td>
                                                    <?php //print $row->price; ?>
                                                </td>
                                            </tr> -->
                                            <?php endif; ?>
                                            <?php if($row->legal): ?>
                                            <tr>
                                                <td class="gray">
                                                    Tình trạng pháp lý 
                                                </td>
                                                <td>
                                                    <?php print $row->legal; ?>
                                                </td>
                                            </tr>
                                            <?php endif;?>
                                            <?php if($row->direction): ?>
                                            <tr>
                                                 <td class="gray">
                                                    Hướng nhà 
                                                </td>
                                                <td>
                                                    <?php print $row->direction; ?> ( m )
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->intake): ?>
                                            <tr>
                                                <td class="gray">
                                                 Đường vào 
                                                </td>
                                                <td>
                                                    <?php print $row->intake; ?> ( m )
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            
                                            <?php if($row->front): ?>
                                            <tr>
                                                <td class="gray">
                                                    Mặt tiền 
                                                </td>
                                                <td>
                                                    <?php print $row->front; ?> ( m )
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            
                                            <?php if($row->floor): ?>
                                            <tr>
                                                <td class="gray">
                                                    Số lầu 
                                                </td>
                                                <td>
                                                    <?php print $row->floor; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->room): ?>
                                            <tr>
                                                <td class="gray">
                                                Số phòng 
                                                </td>
                                                <td>
                                                    <?php print $row->room; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->toilet): ?>
                                            <tr>
                                                <td class="gray">
                                                    Số toilet 
                                                </td>
                                                <td>
                                                    <?php print $row->toilet; ?>
                                                </td>
                                            </tr>   
                                            <?php endif; ?>
                                            <?php if($row->start_date): ?>
                                            <tr>
                                                <td class="gray">
                                                    Ngày đăng 
                                                </td>
                                                <td>
                                                    <?php print api_format_date($row->start_date , 'd/m/Y');?>
                                                </td>
                                            </tr>   
                                            <?php endif; ?>   
                                             <?php if($row->end_date): ?>
                                            <tr>
                                                <td class="gray">
                                                    Ngày hết hạng 
                                                </td>
                                                <td>
                                                    <?php print api_format_date($row->end_date , 'd/m/Y');?>
                                                </td>
                                            </tr>   
                                            <?php endif; ?>   
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="col_right w280 right col_info_contact ">
                                 <div class="_header  pad_l_5 pbn mbm h5">
                                    Thông tin liên hệ
                                </div>	
                                <div class="background_lowlight">
                                     <table class="table table_hover table_row_bordered_top table_row_bordered_bottom tas h7 txt_c" style="width: 100%;">
                                         <tbody>
                                             <?php if($row->info_contact->name): ?>
                                             <tr>
                                                <td style="width: 40%;">
                                                    <span class="gray">Họ tên</span>
                                                </td>
                                                <td>
                                                    <?php print $row->info_contact->name; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->info_contact->address): ?>
                                            <tr>
                                                <td class="">
                                                    <span class="gray">Địa chỉ </span>                                                    
                                                </td>
                                                <td>
                                                    <?php print $row->info_contact->address; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->info_contact->tel): ?>
                                            <tr>
                                                <td class="">
                                                    <span class="gray"> Điện thoại </span>  
                                                </td>
                                                <td>
                                                    <?php print $row->info_contact->tel; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->info_contact->phone): ?>
                                            <tr>
                                                <td class="">
                                                   <span class="gray"> Di động </span> 
                                                </td>
                                                <td>
                                                    <?php print $row->info_contact->phone; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if($row->info_contact->phone): ?>
                                            <tr>
                                                <td class="">
                                                    <span class="gray"> Email </span>                                                    
                                                </td>
                                                <td>
                                                    <?php print $row->info_contact->email; ?>
                                                </td>
                                            </tr>
                                            <?php endif; ?>
                                         </tbody>                                        
                                    </table>
                                </div>
                            </div>
                            <div class="clf"></div>
						</div>
					</div>
				</div>	
                <!---------------box_image_product----------------------------->     
                <?php if($row->total_img > 0): ?>           
				<div class="box">
                    <div class="box_header box_head_basic mbs mln mar_b_5">
                        <div class="line">
							<div class="pbn mbm h5">       
								Hình ảnh
                            </div>
                        </div>					
                    </div>
                    <div class="mtn">
                        <div class="box_body pan">
                            <ul id="media_tabs_contents" class="tab_body">
                                <li class="active" style="display: list-item;">
                                    <div id="photo_player" class="photo_player">								
                                        <!--photo_current----------------->
                                        <div class="photo_payer_current_item_container overlay_container" style="width: 745px; height: 480px; margin: auto;">									
                                            <div class="photo_player_current_item clickable" style="width: 745px; height: 480px;">
                                                <img src="<?php print $row->main_image->url;?>" style="max-width: 745px; max-height: 480px;" alt="" class="landscape">
                                            </div>
                                            <div class="photo_player_previous_button man h1 overlay_left overlay_lowlight overlay_middle clickable"><i class="icon_left_open"></i></div>
                                            <div class="photo_player_next_button man h1 overlay_right overlay_lowlight overlay_middle clickable"><i class="icon_right_open"></i></div>
                                        </div>
                                        <!-----------end_photo_current----------->

                                        <!---------thumbnail_list_photo----------->
                                        <div class="photo_player_thumbnail_container">
                                            <ul class="photo_player_thumbnails" style="text-indent: 0px;">
                                                <?php $i = 1; foreach ($row->list_images as $i_thumb): $i_thumb = api_file_load($i_thumb->fid);?>
                                                <li class="fl">
													<?php if($i == 1):?>
													<a ref="<?php print $i_thumb->url_custom;?>">
														<img data-image-index="0" src="<?php print $i_thumb->thubm;?>" title="<?php print $row->title;?>"  alt="<?php print $row->title;?>" style="width: 70px; height: 50px;" class="photo_player_thumbnail_current">
													</a>
													<?php else: ?>
													<a ref="<?php print $i_thumb->url_custom;?>">
														<img data-image-index="0" src="<?php print $i_thumb->thubm;?>" title="<?php print $row->title;?>"  alt="<?php print $row->title;?>" style="width: 70px; height: 50px;" class="">
													</a>
													<?php endif; ?>
                                                </li>                                               
                                                <?php $i++ ;endforeach; ?>
                                                <li class="clf"></li>
                                            </ul>
                                        </div>
                                        <!-----------end_thumbnail_list_photo----------->								
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
				</div>
				<?php endif; ?>
				<!------------------------end_box_image_product------------------------------------------>
				<!---------------box_map_product----------------------------->                
				<div class="box">
					<div class="mbs box_head_basic  mln">
                        <div class="line">
                            <div class="pbn mbm h5">                          
                                Bản đồ                                
                            </div>
                        </div>					
                    </div>
                    <div class="mtn">
						<div class="box_body pan">
							<div id="map_product" style="width: 745px; height: 480px; margin: auto;"></div>
							<input type="hidden" class="txt_product_real_latitude" value="<?php print $row->latitude;?>" />
							<input type="hidden" class="txt_product_real_longitude" value="<?php print $row->longitude;?>" />
							<input type="hidden" class="txt_product_real_address" value="<?php print $row->full_address;?>" />
						</div>
					</div>
				</div>
				<!------------------------------------------------------------------>
			</div>	
			<div class="col_right right w240">
                <div class="box box_basic mar_t_n box_statistic_product background_white">
                    <div class="box_statistic box_statistic_price">
                        <div class="box_head box_head_basic line">
                              <h5 class="h5">Thống kê theo khoảng giá</h5>
                        </div>                  
                        <div class="box_body mal mtn phn">
                             <?php print $block_statistic_product_price; ?>
                        </div>                   
                    </div>

                    <div class="box_statistic box_statistic_area">
                        <div class="box_head box_head_basic line">
                            <h5 class="h5">Thống kê theo diện tích</h5>
                        </div>                    
                        <div class="box_body mal mtn phn">
                            <?php print $block_statistic_product_area; ?>
                        </div>                    
                    </div>
                </div>
                <div class="box_adv">
                    <?php //print $adv_box_right_300_product_realestate; ?>
                </div>
			</div>
			<div class="clf"></div>	
		</div>
		
	</div>
	<div class="mar_t_20 w770 bg_w">
		<div class="row_title ta_c title box_border_white backgroud pad5">
			<h2><?php print $title ? $title : 'NHÀ ĐẤT BÁN TẠI VIỆT NAM';?></h2>
		</div>   
		<div class="list_product list_product_realestate">
			<?php print $list_real; ?>
		</div>    
	</div>	        
</div>
